package com.hsc.www;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JdbcTokenStore;

import javax.sql.DataSource;

@Configuration
public class MyConfiguration {

//    @Bean
//    @Autowired
//    public UserDetailsService userDetailsService(UserService userService){
//        return new MyJdbcUserDetailsService(userService);
//    }



    @Bean
    @Autowired
    public TokenStore  tokenStore(DataSource dataSource){
      return  new JdbcTokenStore(dataSource);
    }






}
